package com.src.myapplication.ui.contor;

import android.support.v4.widget.SimpleCursorAdapter;
import android.util.Log;

import com.src.myapplication.base.ISQLdata;
import com.src.myapplication.ui.moudle.Mode;

/**
 * Created by Administrator on 2016/10/22.
 */
public class SQLpresenter {
    private Mode mMode;

    private ISQLdata mdata;
     public  SQLpresenter(ISQLdata data){
         this.mMode=new Mode();
         this.mdata=data;
    }



    public void query(){

       SimpleCursorAdapter query = mMode.query(mdata.getIScontext());
        if(query!=null){
            mdata.addAdapter(query);
        }else {
            Log.i("TAG--","空");
        }

    }
    public void delect(){
         mMode.delete(mdata.getIScontext(), mdata.deleid());

    }
}
